package com.hoas.quickstart.threads.chapter01.chapter01_7_2;

public class Run3 {

    public static void main(String[] args) {


        try {
            MyThread thread = new MyThread();
            thread.start();
            Thread.sleep(1000);

            thread.interrupt();
//            Thread.currentThread().interrupt();

            System.out.println("=========测试是否停止1？ = " + thread.isInterrupted());
            System.out.println("===========测试是否停止2？ = " + thread.isInterrupted());
        } catch (InterruptedException e) {
            System.out.println("main catch");
            e.printStackTrace();
        }
        System.out.println("end");


    }

}
